package info.motteke.mixivoice4j;


public class MixiVoiceBuilder {

    public static MixiVoice build() {
        MixiVoiceFactory factory = new SimpleMixiVoiceFactory();

        MixiVoice mixi = factory.getMixiVoice();
        MixiVoiceCache cache = factory.getMixiVoiceCache();

        MixiVoiceObserver observer = new MixiVoiceObserver();

        DataBuilderFactory dbf = new DataBuilderFactory(cache);
        dbf.setObserver(observer);

        mixi.setDataBuilderFactory(dbf);
        mixi.setMixiVoiceCache(cache);
        mixi.setMixiVoiceObserver(observer);

        return mixi;
    }
}
